﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="EcommJewellery.ItemDetail"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:EcommJewellery"
    xmlns:common="using:EcommJewellery.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.TopAppBar>
        <AppBar x:Name="TopApp" Padding="10,0,10,0" MinHeight="110" Background="#F4151515" BorderBrush="#F4151515">
            <Grid Height="100" Margin="40,0">
                <StackPanel Margin="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
                    <Button x:Name="btnHome" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Click="btnHome_Click_1"  >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="84" Margin="0" Width="84" Background="#B2464646">
                            <Image Source="Assets/AppBarImages/TopAppbar1.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnNecklaces" Tag="Necklaces" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0" Click="btnNecklaces_Click_1" >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="84" Margin="0" Width="84" Background="#B2464646">
                            <Image Source="Assets/AppBarImages/TopAppbar2.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnBracelet" Tag="Bracelets" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0" Click="btnBracelet_Click_1" >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="84" Margin="0" Width="84" Background="#B2464646">
                            <Image Source="Assets/AppBarImages/TopAppbar3.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnRing" Tag="Rings" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0" Click="btnRing_Click_1" >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="84" Margin="0" Width="84" Background="#B2464646">
                            <Image Source="Assets/AppBarImages/TopAppbar4.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnEarring" Tag="Earrings" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0" Click="btnEarring_Click_1" >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="84" Margin="0" Width="84" Background="#B2464646">
                            <Image Source="Assets/AppBarImages/TopAppbar5.png" Margin="0"/>
                        </Grid>
                    </Button>

                </StackPanel>
            </Grid>
        </AppBar>
    </Page.TopAppBar>
    <Page.BottomAppBar>
        <AppBar x:Name="BottamApp" Padding="10,0,10,0" MinHeight="90" Background="#F4151515" BorderBrush="#F4151515">
            <Grid Margin="40,10,30,10" HorizontalAlignment="Right">
                <StackPanel Margin="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
                    <Button x:Name="btnMyCart" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Click="btnMyCart_Click_1">
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="73" Margin="0" Width="75">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="54"/>
                                <RowDefinition Height="18"/>
                            </Grid.RowDefinitions>
                            <Image HorizontalAlignment="Center" VerticalAlignment="Center" Source="Assets/AppBarImages/BtmAppBar.png" Width="54" Margin="0" Height="54"/>
                            <StackPanel Margin="0" Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="My Cart" VerticalAlignment="Bottom" FontSize="13.333"/>
                                <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="(1)" VerticalAlignment="Bottom" FontSize="13.333" Margin="3,0,0,0"/>
                            </StackPanel>
                        </Grid>
                    </Button>

                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>

    <Page.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">My Application</x:String>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Style="{StaticResource LayoutRootStyle}">
    	<Grid.Background>
    		<ImageBrush ImageSource="Assets/HubPageImages/Bg.jpg"/>
    	</Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Back button and page title -->
        <ScrollViewer x:Name="scrollViewer" Grid.RowSpan="2" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto">
        	<Grid x:Name="grdMain">
        		<Grid.ColumnDefinitions>
        			<ColumnDefinition Width="49*"/>
        			<ColumnDefinition Width="51*"/>
        		</Grid.ColumnDefinitions>
        		<Grid.RowDefinitions>
        			<RowDefinition Height="120"/>
        			<RowDefinition Height="*"/>
        		</Grid.RowDefinitions>
        		<Grid x:Name="grdBigImage" Grid.RowSpan="2" Margin="0">
        			<Image Stretch="Fill" Source="Assets/NecklacesImages/PartyNecklacesImage.png"/>
        			<StackPanel VerticalAlignment="Bottom" Margin="120,0,0,96">
        				<TextBlock TextWrapping="Wrap" Text="Victorian Floral Necklace" FontFamily="Segoe UI" FontSize="38.667" FontWeight="Light" Foreground="#B2454545"/>
        				<StackPanel Orientation="Horizontal" Margin="0,-10,0,0">
        					<Image Width="17" Source="Assets/HubPageImages/RsIcon.png"/>
        					<TextBlock TextWrapping="Wrap" Text="1300" FontFamily="Segoe UI" FontSize="37.333" FontWeight="Light" Foreground="#B2454545" Margin="8,0,0,0"/>
        				</StackPanel>
        			</StackPanel>
        		</Grid>
        		<StackPanel x:Name="spMainItemDetail" Background="#00000000" Grid.Column="1" Margin="50,0,0,0" Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Top" >
        			<ListView x:Name="lvitemImages" HorizontalAlignment="Left" SelectionMode="None" MaxHeight="560" ScrollViewer.VerticalScrollBarVisibility="Disabled" Width="199" VerticalAlignment="Top">
        				<Grid x:Name="grdImage1" Height="175" Width="173">
        					<Image Source="Assets/ItemDetailPage/DetailImage1.png"/>
        				</Grid>
        				<Grid x:Name="grdImage2" Height="175" Width="173">
        					<Image Source="Assets/ItemDetailPage/DetailImage2.png"/>
        				</Grid>
        				<Grid x:Name="grdImage3" Height="175" Width="173">
        					<Image Source="Assets/ItemDetailPage/DetailImage3.png"/>
        				</Grid>
        			</ListView>
        			<Grid x:Name="grdItemDetail" Width="330">
        				<StackPanel x:Name="spItemDetail">
        					<TextBlock x:Name="txtItemName" TextWrapping="Wrap" FontFamily="Segoe UI" FontSize="16">
        						<Run Text="Victorian style floral design necklace."/>
        					
        					
        					</TextBlock>
        					<TextBlock x:Name="txtItemDetail" TextWrapping="Wrap" FontFamily="Segoe UI" FontSize="16" Text="Carefully crafted to perfection"/>
        					<TextBlock x:Name="txtMaterial" TextWrapping="Wrap" Text="Material" FontFamily="Segoe UI" FontSize="16" FontWeight="Bold" Margin="0,20,0,0"/>
        					<TextBlock x:Name="txtMaterial1" TextWrapping="Wrap" Text="Brass Filigree" FontFamily="Segoe UI" FontSize="16" Margin="0" FontWeight="Light"/>
        					<TextBlock x:Name="txtMaterial2" TextWrapping="Wrap" Text="Copper Alloy" FontFamily="Segoe UI" FontSize="16" Margin="0" FontWeight="Light"/>
        					<TextBlock x:Name="txtSize" TextWrapping="Wrap" Text="Size" FontFamily="Segoe UI" FontSize="16" FontWeight="Bold" Margin="0,20,0,0"/>
        					<StackPanel x:Name="spLength" Orientation="Horizontal">
        						<TextBlock TextWrapping="Wrap" Text="Length:" FontFamily="Segoe UI" FontSize="16" Margin="0" FontWeight="Light"/>
        						<TextBlock TextWrapping="Wrap" Text="28.5 cms" FontFamily="Segoe UI" FontSize="16" Margin="5,0,0,0" FontWeight="Light"/>
        					</StackPanel>
        					<StackPanel x:Name="spWidth" Orientation="Horizontal">
        						<TextBlock TextWrapping="Wrap" Text="Width:" FontFamily="Segoe UI" FontSize="16" Margin="0" FontWeight="Light"/>
        						<TextBlock TextWrapping="Wrap" Text="30.5 cms" FontFamily="Segoe UI" FontSize="16" Margin="5,0,0,0" FontWeight="Light"/>
        					</StackPanel>
        					<TextBlock x:Name="txtColour" TextWrapping="Wrap" Text="Colour" FontFamily="Segoe UI" FontSize="16" FontWeight="Bold" Margin="0,20,0,0"/>
        					<TextBlock x:Name="txtColourName" TextWrapping="Wrap" Text="Vintage Gold" FontFamily="Segoe UI" FontSize="16" Margin="0" FontWeight="Light"/>
        					<StackPanel x:Name="spPrice" Orientation="Horizontal" Margin="0,20,0,0">
        						<TextBlock x:Name="txtPrice" TextWrapping="Wrap" Text="Price" FontFamily="Segoe UI" FontSize="16" FontWeight="Bold" Height="22"/>
        						<TextBlock x:Name="txtRs" TextWrapping="Wrap" Text="Rs." FontFamily="Segoe UI" FontSize="16" FontWeight="Light" Height="22" Margin="5,0,0,0"/>
        						<TextBlock x:Name="txtPrizeDetailes" TextWrapping="Wrap" Text="1580" FontFamily="Segoe UI" FontSize="16" FontWeight="Light" Height="22" Margin="5,0,0,0"/>
        					</StackPanel>
        					<Grid Margin="0" VerticalAlignment="Bottom"/>
        				</StackPanel>
						<Grid x:Name="grdBtnCart" Margin="0" VerticalAlignment="Bottom" Height="50">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="70"/>
								<ColumnDefinition Width="20"/>
								<ColumnDefinition Width="*"/>
							</Grid.ColumnDefinitions>
							<Button x:Name="btnShopping" HorizontalAlignment="Left" VerticalAlignment="Top" BorderThickness="0" Padding="0" Style="{StaticResource ShoppingButtonStyle}">
								<Image Width="54" Source="Assets/ItemDetailPage/Shopping icon.png" Stretch="Fill" Margin="0" Height="50"/>
							</Button>
							<Button x:Name="btnFav" HorizontalAlignment="Left" VerticalAlignment="Top" BorderThickness="0" Padding="0" Style="{StaticResource ShoppingButtonStyle}" Grid.Column="2">
								<Image Width="54" Source="Assets/ItemDetailPage/FvrIcon.png" Stretch="Fill" Margin="0" Height="50"/>
							</Button>
						</Grid>
        			</Grid>
        		</StackPanel>
        	</Grid>
        </ScrollViewer>
        <Grid x:Name="grdSnapView" Grid.RowSpan="2" Visibility="Collapsed">
        	<Grid.Background>
        		<ImageBrush ImageSource="Assets/HubPageImages/Bg.jpg"/>
        	</Grid.Background>
        	<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="&quot;Please switch to full screen to view the details.&quot;" VerticalAlignment="Center" AllowDrop="True" FontSize="21.333" FontFamily="Segoe UI"/>
        </Grid>

        <!-- Back button and page title -->
        <Grid x:Name="grdHeader">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Grid.Column="1" Style="{StaticResource PageHeaderTextStyle}" Foreground="#FF7E6391" Text="Victorian Floral Necklace" FontSize="53.333" Margin="0,0,250,40"/>
            <Image x:Name="image" HorizontalAlignment="Right" Height="77" VerticalAlignment="Center" Width="203" Source="Assets/Logo.png" Margin="0,0,40,0" Grid.Column="1"/>
        </Grid>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="pageTitle">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="image">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>5,23,75,0</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grdSnapView">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Visible</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="scrollViewer">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="TopApp">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BottamApp">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>


    </Grid>
</common:LayoutAwarePage>
